export { }
function buildName(firstName: string, lastName?: string) {
    if (lastName) {
        return `${firstName}·${lastName}`
    } else {
        return firstName
    }
}
buildName('123', '345')
buildName('789')

function eachArr(arr: string[]): void {
    arr.forEach(item => {
        console.log(item);
    })
}
eachArr(['张三', '李四'])
function arr2str(arr: Array<string | number>, separator: string = ',') {
    return arr.join(separator)
}
console.log(arr2str([1, 2, 4]), '&');
console.log(arr2str([1, '2', 34], '-'));

